/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ies.domain.model.web;

import com.ies.domain.model.Permissao;

import com.ies.domain.model.util.JpaPool;
import com.ies.domain.model.web.converter.PermissaoConverter;
import com.ies.domain.model.web.util.AbstractCrudManagedBean;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author gustavo
 */
@ManagedBean(name = "PermissaoCrudMB")
@ViewScoped
public class PermissaoCrudMB extends AbstractCrudManagedBean<Permissao> {


    @Override
    public void init() {
        entity = new Permissao();
        
        
    }

    @Override
    public void delete() {
        if (getRequestParam("id") != null && !getRequestParam("id").isEmpty()) {
            super.delete();
        }
    }

    
     @Override
    public String save() {
        if(entity != null){
            entity.setNome(entity.getNome().toUpperCase());
            return super.save();
        }
        return null;
    }
    
   
}
